package com.example.llm.sgg.sgglangchain.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.llm.sgg.sgglangchain.mapper.AppointmentMapper;
import com.example.llm.sgg.sgglangchain.po.AppointmentPO;
import com.example.llm.sgg.sgglangchain.service.AppointmentService;
import org.springframework.stereotype.Service;

/**
 * @author chenglei
 * @description:
 * @date 2025-04-29 17:28
 * @email 
 */
@Service
public class AppointmentServiceImpl
        extends ServiceImpl<AppointmentMapper, AppointmentPO> implements AppointmentService {
    @Override
    public AppointmentPO findOne(AppointmentPO appointmentPO) {
        LambdaQueryWrapper<AppointmentPO> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(AppointmentPO::getUserName, appointmentPO.getUserName());
        queryWrapper.eq(AppointmentPO::getIdCardNo, appointmentPO.getIdCardNo());
        queryWrapper.eq(AppointmentPO::getAppointmentDate, appointmentPO.getAppointmentDate());
        queryWrapper.eq(AppointmentPO::getDepartment, appointmentPO.getDepartment());
        return super.getOne(queryWrapper);
    }
}
